/** 管理员权限接口二次封装 */
import axios from "../adminRequest";

/**
 * api-2.1 管理员登录
 * @method post
 * @params aname,apwd
 */
export const adminLoginServe = async function (aname, apwd) {
  let url = `/admin/login`;
  let params = `aname=${aname}&apwd=${apwd}`;
  let res = await axios.post(url, params);
  return res.data;
};

/**
 * api-2.2 管理员修改密码
 * @method put
 * @params apwd
 */
export const adminUpdateServe = async function (apwd) {
  let url = `/admin/update`;
  let params = `apwd=${apwd}`;
  let res = await axios.put(url, params);
  return res.data;
};
